package com.xwaiy.xwaiyrpc.springboot.starter.annotation;

import com.xwaiy.xwaiyrpc.springboot.starter.bootstrap.RpcClientBootstrap;
import com.xwaiy.xwaiyrpc.springboot.starter.bootstrap.RpcInitBootstrap;
import com.xwaiy.xwaiyrpc.springboot.starter.bootstrap.RpcServerBootstrap;
import org.springframework.context.annotation.Import;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 启动RPC注解
 * @Author Xwaiy
 * @Date 2025/9/5 11:52
 **/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Import({RpcInitBootstrap.class, RpcServerBootstrap.class, RpcClientBootstrap.class})
public @interface EnableRpc {

    /**
     * 需要启动服务 - 默认true
     * @return
     */
    boolean needServer() default true;
}
